home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / text / misc / cvt / scripts / ebcdic->ascii.cvt < prev    next >
Text File  |  1993-12-31  |  3KB  |  137 lines

  1. /*
  2.  *  EBCDIC -> ASCII
  3.  *
  4.  *  Taken from Lou Seigal's "EBCDIC.PAS" as of 11/29/86
  5.  *
  6.  *  This program was developed out of a need to convert IBM mainframe
  7.  *  data stored in EBCDIC format into data that could easily be imported
  8.  *  to DBASE III and/or DBASE III+.  I used the Black Box catalog for the
  9.  *  code conversions from EBCDIC to ASCII.  Be sure that your data does
  10.  *  not contain any COMP3 or COMP fields (packed numeric).  This program
  11.  *  will not handle those.
  12.  */
  13.  
  14.        $C1 -> 65;      // lhs is EBCDIC, rhs is ASCII
  15.        $C2 -> 66;
  16.        $C3 -> 67;
  17.        $C4 -> 68;
  18.        $C5 -> 69;
  19.        $C6 -> 70;
  20.        $C7 -> 71;
  21.        $C8 -> 72;
  22.        $C9 -> 73;
  23.        $D1 -> 74;
  24.        $D2 -> 75;
  25.        $D3 -> 76;
  26.        $D4 -> 77;
  27.        $D5 -> 78;
  28.        $D6 -> 79;
  29.        $D7 -> 80;
  30.        $D8 -> 81;
  31.        $D9 -> 82;
  32.        $E2 -> 83;
  33.        $E3 -> 84;
  34.        $E4 -> 85;
  35.        $E5 -> 86;
  36.        $E6 -> 87;
  37.        $E7 -> 88;
  38.        $E8 -> 89;
  39.        $E9 -> 90;
  40.        $81 -> 97;
  41.        $82 -> 98;
  42.        $83 -> 99;
  43.        $84 -> 100;
  44.        $85 -> 101;
  45.        $86 -> 102;
  46.        $87 -> 103;
  47.        $88 -> 104;
  48.        $89 -> 105;
  49.        $91 -> 106;
  50.        $92 -> 107;
  51.        $93 -> 108;
  52.        $94 -> 109;
  53.        $95 -> 110;
  54.        $96 -> 111;
  55.        $97 -> 112;
  56.        $98 -> 113;
  57.        $99 -> 114;
  58.        $A2 -> 115;
  59.        $A3 -> 116;
  60.        $A4 -> 117;
  61.        $A5 -> 118;
  62.        $A6 -> 119;
  63.        $A7 -> 120;
  64.        $A8 -> 121;
  65.        $A9 -> 122;
  66.        $F0 -> 48;
  67.        $F1 -> 49;
  68.        $F2 -> 50;
  69.        $F3 -> 51;
  70.        $F4 -> 52;
  71.        $F5 -> 53;
  72.        $F6 -> 54;
  73.        $F7 -> 55;
  74.        $F8 -> 56;
  75.        $F9 -> 57;
  76.        $40 -> 32;
  77.        $5A -> 33;
  78.        $7F -> 34;
  79.        $7B -> 35;
  80.        $5B -> 36;
  81.        $6C -> 37;
  82.        $50 -> 38;
  83.        $7D -> 39;
  84.        $4D -> 40;
  85.        $5D -> 41;
  86.        $5C -> 42;
  87.        $4E -> 43;
  88.        $6B -> 44;
  89.        $60 -> 45;
  90.        $4B -> 46;
  91.        $61 -> 47;
  92.        $7A -> 58;
  93.        $5E -> 59;
  94.        $4C -> 60;
  95.        $7E -> 61;
  96.        $6E -> 62;
  97.        $6F -> 63;
  98.        $7C -> 64;
  99.        $E0 -> 92;
  100.        $6D -> 95;
  101.        $C0 -> 123;
  102.        $6A -> 124;
  103.        $D0 -> 125;
  104.        $A1 -> 126;
  105.        $4A -> 155;
  106.        $5F -> 191;
  107.        $2E -> 6;
  108.        $2F -> 7;
  109.        $16 -> 8;
  110.        $18 -> 24;
  111.        $0D -> 13;
  112.        $11 -> 17;
  113.        $12 -> 18;
  114.        $13 -> 19;
  115.        $3C -> 20;
  116.        $07 -> 127;
  117.        $10 -> 16;
  118.        $19 -> 25;
  119.        $2D -> 5;
  120.        $37 -> 4;
  121.        $27 -> 27;
  122.        $26 -> 23;
  123.        $03 -> 3;
  124.        $0C -> 12;
  125.        $22 -> 28;
  126.        $05 -> 9;
  127.        $25 -> 10;
  128.        $3D -> 21;
  129.        $00 -> 0;
  130.        $35 -> 30;
  131.        $0F -> 15;
  132.        $0E -> 14;
  133.        $01 -> 1;
  134.        $02 -> 2;
  135.        $32 -> 22;
  136.        $0B -> 11;
  137.